package cn.bellychang.whiteboard;

/**
 * @author ChangLiang
 * @date 2021/3/7
 */
public class LeapYearSolution {

    public boolean isLeapYear(int year) {
        boolean result = false;
        if (year < 1000 || year > 9999) {
            return false;
        }
        if (year % 100 == 0) {
            if (year % 400 == 0) {
                result = true;
            }
        } else {
            if (year % 4 == 0) {
                result = true;
            }
        }
        return result;
    }

    public static void main(String[] args) {

        Integer c = 100;

        Integer d = 100;

        System.out.println(c == d);

        Integer a = new Integer(100);

        Integer b = new Integer(100);

        System.out.println(a==b);
    }
}
